package com.stars.home.vmodel

import android.app.Activity
import android.app.Application
import android.graphics.Color
import android.text.TextUtils
import android.view.View
import android.widget.LinearLayout
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.hwangjr.rxbus.RxBus
import com.stars.home.activity.AddBankActivity
import com.stars.home.config.ConfigRx
import com.stars.home.config.MIntentAction
import com.stars.home.inte.ChoiceData
import com.stars.home.model.User
import com.stars.home.utils.PopuTipsUtils
import com.stars.home.utils.net.NetEngine
import com.trailer.base.base.BRRepository
import com.trailer.base.base.BRViewModel
import com.trailer.base.net.IResp
import com.trailer.base.utils.UiSwitch
import kotlinx.coroutines.launch

/**
 *
 *on 2020/9/25
 */
class BankListVModel(application: Application) : BRViewModel<BRRepository>(application) {


    var ll:LinearLayout?=null
    var index=MutableLiveData<Int>()


    //添加
    fun toAdd(){

        UiSwitch.singleRes(repository().context as Activity,
            AddBankActivity::class.java, MIntentAction.REQUEST_CODE_TWO)



    }


    override fun apiFunc(): suspend () -> IResp<*> {
        return { NetEngine.service.backList(10, repository().page) }
    }







}
